package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * Created by joe on 17-4-21.
 */
@Component
public class DemoPublisher {
  @Autowired
  ApplicationContext applicationContext;

  public void publish(String msg){
    applicationContext.publishEvent(new DemoEvent(this,msg));
  }
}
